#!/bin/sh

#check if $1 contain $2
function Str1ContainStr2
{
	str1=$1
	str2=$2
	case  $str1 in  
		*$str2*) 
			return 1;;
		*)
			return 0;;
	esac
}



host=$(hostname)
Str1ContainStr2 $host shdevserver # 36 devev server
if [ $? -eq 1 ];
then
#        common
alias c123="ssh user@192.168.1.123"
	alias csdi4="cd /home/ubuntu/WorkStation/Clearcase/e410580_nx4_davinci_devel_3/vobs/NetAXS"
	alias csdi3="cd /home/ubuntu/WorkStation/Clearcase/e410580_davinci_devel_2/vobs/NetAXS"
	alias cs="cd /home/ubuntu/WorkStation/Clearcase/"
	alias coc="ssh vobadm@158.100.142.120"

	user=$(whoami)
	Str1ContainStr2 $user johny # johny
	if [ $? -eq 1 ];
	then
		echo  "johny's alias......"
		alias svnfd="cd /home/johny/Projects/SVN"
		alias gglshell="cd /home/ubuntu/Public/johnnyGoogleProject/project-johnny/SetupUbuntuEnviroment/ShellEnviroment"
		alias gglnxs="cd /home/ubuntu/Public/johnnyGoogleProject/project-johnny/NetAXS"
		alias gglpjt="cd /home/ubuntu/Public/johnnyGoogleProject/project-johnny/SmallProjects"
		alias sndi4="cd /home/johny/Projects/SVN/36Server/NS4_Davinci"
		alias di4="cd /home/johny/Projects/SVN/36Server/NS4_Davinci"
		alias nve="cd /home/johny/Projects/SVN/HSPA/NetAXS123VE/trunk/Code/APP/NetAXS"
	fi

	user=$(whoami)
	Str1ContainStr2 $user ubuntu # ubuntu 
	if [ $? -eq 1 ];
	then
		echo  "ubuntu's alias......"

		alias svnfd="cd /home/ubuntu/WorkStation/SVN"
		alias imax="cd /home/ubuntu/WorkStation/SVN/HAS-Research/NG_HW_Platform/Code/APP/NetAXS"
		alias imaxbsp="cd /home/ubuntu/WorkStation/SVN/HAS-Research/NG_HW_Platform/Code/BSP"
		# NS4 VE code: it was designed to NS4, but porting the NS3 code. the project dismissed
		alias euclid="cd /home/ubuntu/WorkStation/SVN/AG016-NetAXS-4-PCA-VE/trunk/Code/Euclid2"
		# Galois project is for NS34.4.9 (elevator control, output group, MIRO support for NS3)
		alias galois='cd /home/ubuntu/WorkStation/SVN/AG016-NetAXS-4-PCA-VE/trunk/Code/Galois'
		# the demo NS3 code version for EIOB board(TCP/IP reader panel)
		alias eiob="cd /home/ubuntu/WorkStation/SVN/HAS-Research/IP_Wiegand_Adapter/Code/Galois_EIOB"
		# the NS3 version for the mySQL database, in clearcase, it is call Euclid
		alias sql="cd /home/ubuntu/WorkStation/SVN/OakCreekNetAXS/SQLDatabaseProject/Trunk/Code/NetAXS"
		# the NS3 version for new hardware platform, in demo phase we call it imax project
		alias ve="cd /home/ubuntu/WorkStation/SVN/OakCreekNetAXS/NX123VE/trunk/Code/APP/NetAXS"
		alias nve="cd /home/ubuntu/WorkStation/SVN/HSPA/NetAXS123VE/trunk/Code/APP/NetAXS"
		alias gglshell="cd /home/ubuntu/Public/johnnyGoogleProject/project-johnny/SetupUbuntuEnviroment/ShellEnviroment"
		alias gglnxs="cd /home/ubuntu/Public/johnnyGoogleProject/project-johnny/NetAXS"
		alias gglpjt="cd /home/ubuntu/Public/johnnyGoogleProject/project-johnny/SmallProjects"
		alias di4="cd /home/ubuntu/WorkStation/SVN/Local/36Server/NS4_Davinci"
		alias di3="cd /home/ubuntu/WorkStation/Clearcase/e410580_davinci_devel_2/vobs/NetAXS"

	fi
fi



